package com.system.api.rbac.entity.po;

import java.io.Serializable;
import java.util.Date;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.yang.common.core.annotation.Chinese;
import org.yang.database.orm.entity.BaseModel;

import static com.system.common.constant.MessageConstant.*;

/**
 * sys_permission
 * @author 
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class SysPermission extends BaseModel {


    /**
     * 权限名
     * @mock 添加
     * @required
     */
    @NotBlank(message = PERMISSION_NAME_EMPTY)
    private String name;

    /**
     * 权限标识
     * @mock add:*
     * @required
     */
    @Chinese
    @NotBlank(message = PERMISSION_CODE_EMPTY)
    private String code;

    /**
     * 企业Id
     * @mock 0
     * @apiNote 只有两级, 首级为关联企业ID
     */
    private Long companyId;

    /**
     * 备注
     * @mock 备注
     */
    private String description;

    public SysPermission(Long id, Integer enabled, Integer revision) {
        super(id, enabled, revision);
    }
}